#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int num_rabbit(int month)
{
    int i = 0;
    int bir1 = 0;
    int bir2 = 0;
    int old = 0;
    int num = 0;
    for (i = 1; i <= month; i++)
    {
        if (i == 1)
        {
            bir1 = 1;
            num = 1;
        }
        else
        {
            int tmp = 0;
            num = num + old + bir2;
            old = old + bir2;
            tmp = bir1;
            bir1 = old;
            bir2 = tmp;
        }
    }
    return num;
}

int main()
{
    int month = 0;
    while (scanf("%d", &month) != EOF)
    {
        printf("%d\n", num_rabbit(month));
    }
    return 0;
}